package com.qf.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Author：刘亚康
 * @Date：2020/4/9
 * @QQ：50770284
 * @Phone：18235947935
 * @Desc : 购物车实体类
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("shop_cart")
@ApiModel(value="Cart对象", description="")
public class Cart implements Serializable {


    private static final long serialVersionUID = 3096250953904316441L;

    @ApiModelProperty(value = "购物车id")
    @TableId(value = "cart_id", type = IdType.AUTO)
    private Integer cartId;

    @ApiModelProperty(value = "商品id")
    private Integer goodsId;

    @ApiModelProperty(value = "商品数量")
    private Integer goodsCount;

    @ApiModelProperty(value = "商品小计")
    private BigDecimal goodsSubtotal;

    @ApiModelProperty(value = "用户id")
    private Integer userId;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(exist = false)
    private Goods goods;

}
